/**
 * 
 */
package com.socialnetwork.security.pwd;

/**
 * @author asoundar
 *
 */
public class PwdAuthenticator {
	
	/**
	 * @param login
	 * @param clearTextPassword
	 * @param currentEncryptedPassword
	 * @return
	 */
	public static boolean authenticate(String login, String clearTextPassword,
			String currentEncryptedPassword) {

		String encryptedPassword = PwdEncryptor.encrypt(clearTextPassword);
		
		if (currentEncryptedPassword.equals(encryptedPassword)) {
			return true;
		}
		return false;
	}
}
